/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-05-20
 * Time: 12:48
 */
//统计次数
public class code7 {
    public static int getMax(int[] nums){
        int Max=nums[0];
        for(int x:nums){
            Max=x>Max?x:Max;
        }
        return Max;
    }
    public static void main(String[] args) {
        int nums[]=new int[]{3,2,3};
        int Max1=getMax(nums);
        int[] tmp=new int[Max1+1];
        for(int x:nums){
            tmp[x]++;
        }
        int pos=0;
        for(int i=0;i<tmp.length;i++){
            if(tmp[pos]<tmp[i]){
                pos=i;
            }
        }
        System.out.println(pos);
    }
}
